/*******************************************************************************
 * 文件名: BaseFilter.java
 * 描    述: 过滤器基础类
 * 创建人: Dean Huang(hudi-112@163.com)
 * 日　期: 2018-03-07
 * 描　述: 文件描述
 * 版　本: 1.0
 *******************************************************************************/

package com.z1.core.web.filter;

import javax.servlet.Filter;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;

import org.apache.log4j.Logger;
import org.springframework.web.context.support.WebApplicationContextUtils;

public abstract class BaseFilter implements Filter {

	protected Logger logger = Logger.getLogger(getClass());
	
	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		WebApplicationContextUtils
			.getWebApplicationContext(filterConfig.getServletContext())
			.getAutowireCapableBeanFactory()
			.autowireBean(this);
	}

}
